import * as actionTypes from '../action_types';

const initState = {
    title:'首页'
};
const Reducer = (state = initState, action) => {
    const { type, data} = action
    let newState = JSON.parse(JSON.stringify(state));
    switch (type) {
        case actionTypes.SAVE_TITLE:
            newState.title =data;         
            return newState;
        default:
            return state;
    }

}
export default Reducer;
